package com.itdao.dp.strategy.duck.holder;

import com.itdao.dp.strategy.duck.behavior.fly.impl.NoFlyBehavior;
import com.itdao.dp.strategy.duck.behavior.quack.impl.NoQuackBehavior;
import com.itdao.dp.strategy.duck.behavior.swim.impl.NoSwimBehavior;

public class ToyDuck extends Duck {
    public ToyDuck() {
        flyBehavior = new NoFlyBehavior();
        quackBehavior = new NoQuackBehavior();
        swimBehavior = new NoSwimBehavior();
    }

    @Override
    public void display() {
        System.out.println("我是玩具鸭~~");
    }

    @Override
    public void fly() {
        flyBehavior.fly();
    }

    @Override
    public void quack() {
        quackBehavior.quack();
    }

    @Override
    public void swim() {
        swimBehavior.swim();
    }
}
